Skip to content

Feat/122/update routes and end points#124

Merged
Kimoo193 merged 3 commits into
mainfrom
feat/122/update-routes-and-end-points
Apr 9, 2025
Merged

Feat/122/update routes and end points#124
Kimoo193 merged 3 commits into
mainfrom
feat/122/update-routes-and-end-points

Conversation

@Kimoo193
Copy link
Copy Markdown
Contributor

@Kimoo193 Kimoo193 commented Apr 9, 2025

PR Checklist (required)

Please check if your PR fulfills the following requirements:

  • The commit message follows our guidelines.

  • Tests for the changes have been added (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation changes
  • Other... Please describe:

Related Issue

Closes #122

@Kimoo193 Kimoo193 added the enhancement New feature or request label Apr 9, 2025
@Kimoo193 Kimoo193 requested a review from Copilot April 9, 2025 14:41
@Kimoo193 Kimoo193 self-assigned this Apr 9, 2025
@Kimoo193 Kimoo193 linked an issue Apr 9, 2025 that may be closed by this pull request
@Kimoo193
Copy link
Copy Markdown
Contributor Author

Kimoo193 commented Apr 9, 2025

This pull request includes various updates to the user and department management functionalities, as well as improvements to the API documentation. The most important changes include removing unnecessary middleware, updating department routes, and enhancing the Swagger documentation.

Middleware Removal:

  • Removed verifyManagerPermission middleware (src/middlewares/verifyManagerPermission.middleware.js).
  • Removed verifyOwnerOrAdmin middleware (src/middlewares/verifyOwnerOrAdmin.middleware.js).

Route Updates:

  • Updated department routes to remove middleware checks and adjust endpoints for better clarity (src/routes/department.routes.js).

Swagger Documentation Enhancements:

  • Updated the department creation endpoint to include organization and manager IDs in the path (src/docs/swagger.json).
  • Improved response descriptions and added more detailed error responses for various endpoints (src/docs/swagger.json) [1] [2] [3].
  • Added detailed examples for request and response bodies in the Swagger documentation (src/docs/swagger.json) [1] [2] [3] [4] [5] [6].

Validation Updates:

  • Removed organizationId and managerId from the department creation validation schema (src/validations/department.validation.js).

Minor Adjustments:

  • Removed an unnecessary ESLint directive from src/controllers/user.controller.js.
  • Simplified the phone number update logic in updateUserAccount method (src/controllers/user.controller.js).
  • Updated the TODO documentation to reflect new tasks (src/docs/TODO.md).

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 8 out of 9 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • src/docs/swagger.json: Language not supported
Comments suppressed due to low confidence (1)

src/controllers/user.controller.js:177

  • The encryption for phoneNumber has been removed. Confirm that this change is intentional and phone numbers no longer need to be encrypted before storage.
updateData.phoneNumber = value.phoneNumber;

Comment thread src/routes/department.routes.js
@Kimoo193 Kimoo193 merged commit d6bbcda into main Apr 9, 2025
11 checks passed
@Kimoo193 Kimoo193 deleted the feat/122/update-routes-and-end-points branch April 9, 2025 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: update Routes and End points

2 participants